package com.grz.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.Date;

@Data
@AllArgsConstructor
public class User {
    private String name;
    private Integer age;

    //    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date birthday1;

    //    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime birthday2;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate birthday3;

    //    @DateTimeFormat(pattern = "HH:mm:ss")
    private LocalTime birthday4;
}
